<?php
namespace data\service;

use app\api\utils\ArrayUtil;
use data\model\StickersModel;

class StickersService extends BaseService {

    private $stickersModel = null;

    public function __construct() {
        parent::__construct();
        $this->stickersModel = new StickersModel();
    }
    public function getStickersLists( $page , $pageSize , $where , $order = "", $fields = "*" ){
        $stickersLists = $this->stickersModel->pageQuery( $page , $pageSize , $where , $order ,$fields );
        $retData = [];
        if(!empty($stickersLists['data'])){
            foreach($stickersLists['data'] as $ck => $cv){
                $retData[$ck] = [
                    'id' => $cv['id'],
                    'url' => "https://oss.ido.icu/static/uploads/stickers/" . $cv['url'].IMG_STYLE,
                ];
            }
            return $retData;
        }
        return [];
    }
}
